typedef enum {
    RED,
    BLACK
} rbtree_color;


struct mynode {
    int key;
    void *value;
    rbtree_color color;
    struct mynode *parent;
    struct mynode *left;
    struct mynode *right;
};
typedef struct mynode mynode;

typedef struct {
    mynode *root;
    mynode *nil;
    int size;
} myrbtree;

myrbtree *rbtree_create();
mynode *node_create(int key, void *val);
void rbtree_insert(myrbtree *t, mynode *n);
mynode *rbtree_remove(myrbtree *t, mynode *n);
void travel_tree(myrbtree *t);
mynode *tree_minimum(myrbtree *t, mynode *n);
